package sg.edu.nus.iss.jass.dto;

import java.util.Date;
import java.util.List;

import sg.edu.nus.iss.jass.datastore.BaseDTO;
import sg.edu.nus.iss.jass.util.Util;


public class JobAdvert extends BaseDTO{
	private Date creation;
	private String description;
	private Boolean isHideSalary;
	private Boolean isWithdrawn;
	private float minSalary;
	private float maxSalary;
	private List<Skill> skills;
	private String skillIds;
	private Date startDate;
	private Boolean status;
	private String title;
	private String position;
	private Company company;
	private String companyId;
	private GeographicalLocation geographicalLocation;
	private String geographicalLocationId;
	
	
	/**
	 * @return the skills
	 */
	public List<Skill> getSkills() {
		return skills;
	}

	/**
	 * @param skills the skills to set
	 */
	public void setSkills(List<Skill> skills) {
		this.skills = skills;
	}

	/**
	 * @return the skillIds
	 */
	public String getSkillIds() {
		if(!Util.isEmpty(skills)){
			return super.getIds(skills);
		}
		if(!Util.isEmpty(skillIds)) {
			return skillIds;
		}
		return null;
	}

	/**
	 * @param skillIds the skillIds to set
	 */
	public void setSkillIds(String skillIds) {
		this.skillIds = skillIds;
	}	
	
	/**
	 * @return the geographicalLocationId
	 */
	public String getGeographicalLocationId() {
		
		if(geographicalLocation != null){
			return geographicalLocation.getId();
		}
		if(!Util.isEmpty(geographicalLocationId)) {
			return geographicalLocationId;
		}
		return null;
	}

	
	/**
	 * @param geographicalLocationId the geographicalLocationId to set
	 */
	public void setGeographicalLocationId(String geographicalLocationId) {
	
		this.geographicalLocationId = geographicalLocationId;
	}

	/**
	 * @return the companyId
	 */
	public String getCompanyId() {
		
		if(company != null){
			return company.getId();
		}
		if(!Util.isEmpty(companyId)) {
			return companyId;
		}
		return null;
	}

	/**
	 * @param companyId
	 */
	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	/**
	 * @return the creation
	 */
	public Date getCreation() {
	
		return creation;
	}
	
	/**
	 * @param creation the creation to set
	 */
	public void setCreation(Date creation) {
	
		this.creation = creation;
	}
	
	/**
	 * @return the description
	 */
	public String getDescription() {
	
		return description;
	}
	
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
	
		this.description = description;
	}
	
	/**
	 * @return the isHideSalary
	 */
	public Boolean getIsHideSalary() {
	
		return isHideSalary;
	}
	
	/**
	 * @param isHideSalary the isHideSalary to set
	 */
	public void setIsHideSalary(Boolean isHideSalary) {
	
		this.isHideSalary = isHideSalary;
	}
	
	/**
	 * @return the isWithdrawn
	 */
	public Boolean getIsWithdrawn() {
	
		return isWithdrawn;
	}
	
	/**
	 * @param isWithdrawn the isWithdrawn to set
	 */
	public void setIsWithdrawn(Boolean isWithdrawn) {
	
		this.isWithdrawn = isWithdrawn;
	}
	
	
	
	/**
	 * @return the minSalary
	 */
	public float getMinSalary() {
	
		return minSalary;
	}


	
	/**
	 * @param minSalary the minSalary to set
	 */
	public void setMinSalary(float minSalary) {
	
		this.minSalary = minSalary;
	}


	
	/**
	 * @return the maxSalary
	 */
	public float getMaxSalary() {
	
		return maxSalary;
	}


	
	/**
	 * @param maxSalary the maxSalary to set
	 */
	public void setMaxSalary(float maxSalary) {
	
		this.maxSalary = maxSalary;
	}

	/**
	 * @return the startDate
	 */
	public Date getStartDate() {
	
		return startDate;
	}
	
	/**
	 * @param startDate the startDate to set
	 */
	public void setStartDate(Date startDate) {
	
		this.startDate = startDate;
	}
	
	/**
	 * @return the status
	 */
	public Boolean getStatus() {
	
		return status;
	}
	
	/**
	 * @param status the status to set
	 */
	public void setStatus(Boolean status) {
	
		this.status = status;
	}
	
	/**
	 * @return the title
	 */
	public String getTitle() {
	
		return title;
	}
	
	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
	
		this.title = title;
	}
	
	/**
	 * @return the position
	 */
	public String getPosition() {
	
		return position;
	}
	
	/**
	 * @param position the position to set
	 */
	public void setPosition(String position) {
	
		this.position = position;
	}
	
	/**
	 * @return the company
	 */
	public Company getCompany() {
	
		return company;
	}
	
	/**
	 * @param company the company to set
	 */
	public void setCompany(Company company) {
	
		this.company = company;
	}
	
	/**
	 * @return the geographicalLocation
	 */
	public GeographicalLocation getGeographicalLocation() {
	
		return geographicalLocation;
	}
	
	/**
	 * @param geographicalLocation the geographicalLocation to set
	 */
	public void setGeographicalLocation(GeographicalLocation geographicalLocation) {
	
		this.geographicalLocation = geographicalLocation;
	}
	
	

}
